package com.main.hotel.service.impl;
import com.main.hotel.repository.RoomRepository;
import com.main.hotel.service.RoomService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class RoomServiceImpl implements RoomService {
@Autowired
private RoomRepository roomRepository;
  @Override
  public int findRoomCount(String room_type) {
    return roomRepository.findRoomCount(room_type);
  }

  @Override
  public int book(String room_type,String order_id) {
    return roomRepository.book(room_type,order_id);
  }

  @Override
  public int findRoomId(String order_id) {
    return roomRepository.findRoomId(order_id);
  }

  @Override
  public int cancelBook(String order_id) {
    return roomRepository.cancelBook(order_id);
  }
}
